/**
 * 基础路由
 * @type { *[] }
 */

const constantRouterMap = [
  {
    path: "/",
    redirect: "/layout",
  },
  {
    path: "/login",
    name: "Login",
    component: () => import("@/views/login/index.vue"),
    meta: {
      title: "登录",
      KeepAlive: true,
    },
  },
  {
    path: "/layout",
    name: "Layout",
    redirect: "/product",
    component: () => import("@/layout/index.vue"),
    children: [
      /* 产品管理 */
      {
        path: "/product",
        name: "Product",
        redirect: "/productSelect",
        meta: {
          key: "0",
          title: "产品管理",
          icon: "product",
          KeepAlive: true,
          isHide: false,
        },
        children: [
          {
            path: "/productSelect",
            name: "ProductSelect",
            component: () => import("@/views/productSelect/index.vue"),
            meta: {
              key: "0-1",
              title: "产品查询",
              icon: "product",
              KeepAlive: true,
              isHide: false,
            },
          },
        ],
      },
      /* 公告管理 */
      {
        path: "/announcement",
        name: "Announcement",
        meta: {
          key: "1",
          title: "公告管理",
          icon: "announcement",
          KeepAlive: true,
          isHide: false,
        },
        children: [
          {
            path: "/announcementSelect",
            name: "AnnouncementSelect",
            component: () => import("@/views/announcementSelect/index.vue"),
            meta: {
              key: "1-1",
              title: "公告查询",
              icon: "announcement",
              KeepAlive: true,
              isHide: false,
            },
          },
        ],
      },
      /* 员工管理 */
      {
        path: "/staff",
        name: "Staff",
        meta: {
          key: "2",
          title: "员工管理",
          icon: "staff",
          KeepAlive: true,
          isHide: false,
        },
        children: [
          {
            path: "/departmentSet",
            name: "DepartmentSet",
            component: () => import("@/views/departmentSet/index.vue"),
            meta: {
              key: "2-1",
              title: "部门设置",
              icon: "department",
              KeepAlive: true,
              isHide: false,
            },
          },
          {
            path: "/staffSet",
            name: "StaffSet",
            component: () => import("@/views/staffSet/index.vue"),
            meta: {
              key: "2-2",
              title: "员工设置",
              icon: "staff",
              KeepAlive: true,
              isHide: false,
            },
          },
        ],
      },
      // /* 用户管理 */
      // {
      //   path: "/user",
      //   name: "User",
      //   meta: {
      //     title: "用户管理",
      //     icon: "staff",
      //     KeepAlive: true,
      //     isHide: false,
      //   },
      //   children: [
      //     {
      //       path: "/departmentSet",
      //       name: "DepartmentSet",
      //       component: () => import("@/views/departmentSet/index.vue"),
      //       meta: {
      //         title: "部门设置",
      //         icon: "department_set",
      //         KeepAlive: true,
      //         isHide: false,
      //       },
      //     },
      //     {
      //       path: "/staffSet",
      //       name: "StaffSet",
      //       component: () => import("@/views/staffSet/index.vue"),
      //       meta: {
      //         title: "员工设置",
      //         icon: "staff-set",
      //         KeepAlive: true,
      //         isHide: false,
      //       },
      //     },
      //   ],
      // },
    ],
  },
];

export default constantRouterMap;
